<admintpl file="headerEx" />
<title>{:L('ADMIN_PLUGIN_INDEX')}</title>
<!--responsive table-->
<link href="__PUBLIC__/TciocEx/css/table-responsive.css" rel="stylesheet" />
<link href="__PUBLIC__/js/artDialog/skins/default.css" rel="stylesheet" />
</head>

<!-- Placed js at the end of the document so the pages load faster -->
<body class="sticky-header">
<section>
	<!-- main content start-->
	<div class="full-content" >
		<!--body wrapper start-->
		<div class="wrapper">
			<div class="row">
				<div class="col-sm-12">
					<section class="panel">
						<header class="panel-heading custom-tab turquoise-tab">
							<ul class="nav nav-tabs">
								<li class="active"><a href="{:U('plugin/index')}"><i class="fa fa-list-ul"></i> {:L('ADMIN_PLUGIN_INDEX')}</a></li>
							</ul>
						</header>
						<div class="panel-body">

							<section id="no-more-tables">
								<form class="js-ajax-form" action="{:U('nav/listorders')}" method="post">
									<php>
										$status=array("1"=>L('ENABLED'),"0"=>L('DISABLED'),"3"=>L('UNINSTALLED'));
									</php>

									<table class="table table-bordered table-striped table-hover table-condensed cf">
										<thead class="cf">
										<tr>
											<th>{:L('NAME')}</th>
											<th>{:L('TEXT_DOMAIN')}</th>
											<th>{:L('HOOKS')}</th>
											<th>{:L('DESCRIPTION')}</th>
											<th>{:L('AUTHOR')}</th>
											<th width="100">{:L('STATUS')}</th>
											<th width="150">{:L('ACTIONS')}</th>
										</tr>
										</thead>
										<tbody>
										<foreach name="plugins" item="vo">
											<tr>
												<td>{$vo.title}</td>
												<td>{$vo.name}</td>
												<td>{$vo.hooks}</td>
												<td>{$vo.description}</td>
												<td>{$vo.author}</td>
												<td>{$status[$vo['status']]}</td>
												<td>
													<if condition="$vo['status']==3">
														<a href="{:U('plugin/install',array('name'=>$vo['name']))}" class="js-ajax-dialog-btn" data-msg="确定安装该插件吗？">安装</a>
														<else />
														<php>$config=json_decode($vo['config'],true);</php>
														<if condition="!empty($config)">
															<a href="{:U('plugin/setting',array('id'=>$vo['id']))}">{:L('SETTING')}</a>|
															<else/>
															<a href="javascript:;" style="color: #ccc;">{:L('SETTING')}</a>|
														</if>

														<if condition="!empty($vo['has_admin'])">
															<a href="javascript:parent.openapp('{:sp_plugin_url($vo['name'].'://AdminIndex/index')}','plugin_{$vo.name}','{$vo.title}')">管理</a>|
															<else/>
															<a href="javascript:;" style="color: #ccc;">管理</a>|
														</if>

														<a href="{:U('plugin/update',array('name'=>$vo['name']))}" class="js-ajax-dialog-btn" data-msg="确定更新该插件吗？">更新</a>|

														<if condition="$vo['status']==0">
															<a href="{:U('plugin/toggle',array('id'=>$vo['id'],'enable'=>1))}" class="js-ajax-dialog-btn" data-msg="确定启用该插件吗？">启用</a>|
															<else/>
															<a href="{:U('plugin/toggle',array('id'=>$vo['id'],'disable'=>1))}" class="js-ajax-dialog-btn" data-msg="确定禁用该插件吗？">禁用</a>|
														</if>

														<a href="{:U('plugin/uninstall',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确定卸载该插件吗？">卸载</a>
													</if>
												</td>
											</tr>
										</foreach>
										</tbody>

									</table>

								</form>
							</section>

						</div>
					</section>
				</div>
			</div>
		</div>

	</div>
	</div>
	</div>
	<!--body wrapper end-->

	<!--footer section start-->
	<footer>
		<admintpl file="copyright" />
	</footer>
	<!--footer section end-->

	</div>
	<!-- main content end-->
</section>

<script src="__PUBLIC__/TciocEx/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/wind.js"></script>
<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="__PUBLIC__/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/modernizr.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/js/ajaxForm.js"></script>

<script type="text/javascript" src="__PUBLIC__/TciocEx/js/jquery.validate.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-localization/messages_zh.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/scripts.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-init.js"></script>

</body>
</html>